package 设计模式.创建型模式.demo04原型模式.demo02官方实现;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @author: 王富贵
 * @description: 狗类
 * @createTime: 2022/11/07 15:58
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@ToString
public class Cat implements Cloneable{
    private String name;
    public String likeFood;

    //实现Cloneable接口重写clone方法
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
